Skip to content

PivCoHuffman implementation#61

Draft
Sanya239 wants to merge 2 commits into
mainfrom
PivCo-Huffman
Draft

PivCoHuffman implementation#61
Sanya239 wants to merge 2 commits into
mainfrom
PivCo-Huffman

Conversation

@Sanya239

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f80561440

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +387 to +390
static T read(std::span<const std::byte> data, std::size_t& pos) {
T value;
std::memcpy(&value, data.data() + pos, sizeof(T));
pos += sizeof(T);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate compressed input before reading

When callers load a truncated or corrupt persisted stream through the public std::span<const std::byte> constructor, this helper unconditionally copies sizeof(T) bytes from data.data() + pos without checking that the bytes exist; a 1-byte span already reads past the buffer in the first header read, and later node/bitmap reads have the same issue. The deserializer should reject malformed streams before copying or indexing into decoded nodes rather than relying on the input being perfectly formed.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.19820% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.30%. Comparing base (bf01091) to head (9f80561).

Files with missing lines Patch % Lines
include/pixie/huffman/pivco_huffman.h 98.24% 2 Missing and 1 partial ⚠️
src/tests/pivco_huffman_tests.cpp 97.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   90.10%   90.30%   +0.20%     
==========================================
  Files          39       42       +3     
  Lines        8735     8957     +222     
  Branches     1418     1447      +29     
==========================================
+ Hits         7871     8089     +218     
- Misses        447      449       +2     
- Partials      417      419       +2     
Flag Coverage Δ
gcov 90.30% <98.19%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Sanya239
Sanya239 marked this pull request as draft July 21, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant